/*******************************************************************
 * 外语翻译平台(translate) 
 *
 * 成都一亿信息技术公司 版权所有
 * 
 * Copyright (C) 2010 Transer Information Technology Co., Ltd.
 *
 * @Version : 1.0  2011-1-7 上午11:15:57
 *
 * SimpleObject.java
 *
 *******************************************************************/
package com.transer.json;

import java.util.ArrayList;
import java.util.List;

/**
 * class defination are there
 * 
 * @author Mark
 * 
 * @version 1.0 ywengineer@gmail.com
 * 
 */
@SuppressWarnings("rawtypes")
public class SimpleObject implements Comparable {
	private int id;
	private String name;
	private List<String> s = new ArrayList<String>();
	
	public SimpleObject(){
		
	}

	/**
	 * 
	 */
	public SimpleObject(int id, String name) {
		// TODO Auto-generated constructor stub
		this.id = id;
		this.name = name;
	}

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Comparable#compareTo(java.lang.Object)
	 */
	@Override
	public int compareTo(Object o) {
		if (o instanceof SimpleObject) {
			SimpleObject oo = (SimpleObject) o;
			if (getId() > oo.getId()) {
				return 1;
			}
		}
		return 0;
	}

	/**
	 * @return the s
	 */
	public List<String> getS() {
		return s;
	}

	/**
	 * @param s
	 *            the s to set
	 */
	public void setS(List<String> s) {
		this.s = s;
	}
}
